package blog.rupesr.spring.main;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import blog.rupesr.spring.bean.HelloService;
import blog.rupesr.spring.bean.HelloServiceImpl;

/**
 * The Class Main.
 * 
 * @author Rupesh
 */
public class Main {

	/** The log. */
	private static Log log = LogFactory.getLog(Main.class);

	/**
	 * The main method.
	 * 
	 * @param args
	 *            the arguments
	 */
	public static void main(String[] args) {
		ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
		HelloService helloService = (HelloServiceImpl) applicationContext.getBean("helloService");
		log.info(helloService.sayHello("Spring User"));
	}
}
